<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html >
<html>
<head>
<title>我申请的流程</title>
<%@include file="/common/jsp/taglib.jsp"%>
<script type="text/javascript" src="${ctx }common/system/assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="${ctx }common/system/assets/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
<script type="text/javascript" src="${ctx }common/system/assets/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>

<script type="text/javascript" >
$(function(){
	
	////刷新下拉菜单 <select>标签id,  action地址, 参数
	common.refreshSelect('approvestatus','code2nameOfProperties','workflowtask_status');
	
	$(".form_datetime").datetimepicker({
	    format: "yyyy-mm-dd HH:ii",
	    showMeridian: true,
	    autoclose: true,
	    todayBtn: true,
	    startDate: "2015-02-14 10:00",
	});
	
	
});

</script>
</head>
<body>


	<div class="row">
		<div class="col-lg-12">
			<section class="panel">
				<header class="panel-heading">
					<span class="tools pull-left"> 
					<a class="icon-search" style="padding:10px;" href="javascript:void(0);" onclick="goUp(this);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</span>
					<div class="clearfix">
						<div class="pull-right">
						</div>
					</div>
				</header>
				<div class="panel-body" style="display: none;">
					<form id="myApplyForm" role="form" class="form-inline" method="post" action="${ctx }common/s.do">
					<input type="hidden" name="statement" value="workFlow_SpecSql.myApplyList"  />
					<input type="hidden" name="tourl" value="/ass/workflow/myApplyList_n"  />
					<input type="hidden" name="" value=""  />
                        <div class="form-group">
                            <label for="title" >标题</label>
                            <input type="text" placeholder="title" name="title" id="title" value="${mp.title }" class="form-control" >
                        </div>
                        <div class="form-group">
                            <label for="approvestatus" >审批状态</label>
                            <select placeholder="审批状态" name="approvestatus" id="approvestatus" class="form-control">
                            </select>
                        </div>
                        
                        <div class="form-group date " style="width:150px" data-date="2012-12-21T15:25:00Z">
                            <label >申请日期开始于</label>
                            <input type="text" size="16" name="appBeginTime" value="${mp.appBeginTime }" readonly="" class="form-control form_datetime">
                        </div>
                        <div class="form-group date form_datetime-meridian" style="width:150px" >
                        	<label >申请日期结束于</label>
                            <input type="text" size="16" name="appEndTime" value="${mp.appEndTime }" readonly="" class="form-control form_datetime" >
                        </div>
                        <button style="margin-top: 23px;" class="btn btn-success" type="button" onclick="common.submitForm('myApplyForm');"  >查询</button>
                        <button style="margin-top: 23px;"  class="btn btn-default" type="button" onclick="common.clearForm('myApplyForm')">重置</button>
                    </form>
					
				</div>


				<table class="table table-striped table-advance table-hover">
					<thead>
						<tr>

							<th><i class="icon-bookmark"></i>序号</th>
							<th><i class="icon-bookmark"></i>名称</th>
							<th><i class="icon-bookmark"></i>当前审批人</th>
							<th><i class="icon-bookmark"></i>申请日期</th>
							<th><i class="icon-bookmark"></i>创建日期</th>
							<th><i class="icon-cog"></i>审批状态</th>
							<th><i class="icon-edit"></i> 操作</th>

						</tr>
					</thead>
					<tbody>
						<c:forEach var="p" items="${pageGrid.rows }" varStatus="ind">
							<tr>
								<td>${ind.index +1}</td>
								<td>${p.title }</td>
								<td>${p.participantName }</td>
								<td>${p.appDate }</td>
								<td>${p.make_time }</td>
								<td>${p.statusName }</td>
								<td>
									<!-- 
										//00未提交01审批中02退回03已通过04作废    00,02 可以 提交,作废
										 -->
									<c:choose>
										<c:when test="${p.status == '00' || p.status == '02' }">
										    <button class="btn btn-success btn-xs">
												<i class="icon-ok">提交</i>
											</button>
											<button class="btn btn-primary btn-xs">
												<i class="icon-trash">作废</i>
											</button>
											<button class="btn btn-danger btn-xs">
												<i class="icon-hand-up">详情</i>
											</button> 
										</c:when>
										<c:otherwise>
											<button class="btn btn-success btn-xs" disabled="disabled">
												<i class="icon-ok">提交</i>
											</button>
											<button class="btn btn-primary btn-xs" disabled="disabled" >
												<i class="icon-trash">作废</i>
											</button>
											<button class="btn btn-danger btn-xs">
												<i class="icon-hand-up">详情</i>
											</button> 
										</c:otherwise>
									</c:choose> 

								</td>
								
							</tr>
						</c:forEach>

					</tbody>
				</table>
			</section>
		</div>
	</div>


	<!-- 主体内容结束 -->
	<!-- 分页 -->
	<input type="hidden" value="myApplyForm" id="currentFormId" />
	<jsp:include page="/common/system/pager.jsp" flush="true" />





</body>
</html>